/**
 * Copyright © 2022 yanyljava Info. Tech Ltd. All rights reserved.
 *
 * @ProjectName film-framework
 * @FileName TestCase.java
 * @PackageName com.wolfeyes.framework.config
 * @ClassName TestCase
 * @author <a href="https://gitee.com/yanyljava" target="_blank">yanyljava</a>
 * @date 2022-04-07 23:11:40.413+0800
 * @version 1.0
 */
package com.wolfeyes.framework.config;


/**
 * @ProjectName film-framework
 * @PackageName com.wolfeyes.framework.config
 * @ClassName TestCase
 * @title TODO
 * @description TODO
 * @author <a href="https://gitee.com/yanyljava" target="_blank">yanyljava</a>
 * @email yanyljava@qq.com
 * @datetime 2022-04-10 22:50:36.938+0800
 * @version 1.0
 */
public class TestCase implements TestCaseInterface {

	
	/**
	 * @title TODO
	 * @description TODO
	 * @Field testField: TODO(用一句话描述这个变量表示什么)
	 */
	@SuppressWarnings("unused")
	private Integer testField;
	
	/**
	 * @return the testField
	 */
	public Integer getTestField() {
		return testField;
	}

	/**
	 * @param testField the testField to set
	 */
	public void setTestField(Integer testField) {
		this.testField = testField;
	}


	/**
	 * @title TestCase
	 * @description TODO
	 */
	public TestCase() {
		
	}
	
	/**
	 * @title testMethod
	 * @description TODO
	 * @author <a href="https://gitee.com/yanyljava" target="_blank">yanyljava</a>
	 * @email yanyljava@qq.com
	 * @datetime 2022-04-11 12:09:31.635+0800
	 * @param a 参数a
	 * @return int 返回值
	 */
	public static int testMethod(int a) {
		
		return 0;
	}
	
	/**
	 * @title testMethod2
	 * @description TODO
	 * @author <a href="https://gitee.com/yanyljava" target="_blank">yanyljava</a>
	 * @email yanyljava@qq.com
	 * @datetime 2022-04-11 12:12:28.118+0800
	 * @param a void
	 */
	public void testMethod2(int a) {
		//return 0;
	}
	
	/**
	 * (non-Javadoc)
	 * @title testMethod3
	 * @description TODO
	 * @param a
	 * @return
	 * @author <a href="https://gitee.com/yanyljava" target="_blank">yanyljava</a>
	 * @email yanyljava@qq.com
	 * @datetime 2022-04-11 12:19:38.238+0800
	 * @see com.wolfeyes.framework.config.TestCaseInterface#testMethod3(int)
	 */
	@Override
	public double testMethod3(int a) {
		// TODO 自动生成的方法存根
		return TestCaseInterface.super.testMethod3(12);
	}
	
	public static void main(String[] args) {
		
	}
	
}

interface TestCaseInterface {
	
	
	default public double testMethod3(int a) {
		return 2d;
	}
}

//class A{
//	protected int a;
//}
//class B extends A {
//	
////	public B() {
////		super.a =5;
////	}
////	public B(int c) {
////		super.a =5;
////	}
//	public static void main(String[] args) {
//		new B() ;
//	}
//}

//Java的初始化顺序（没有继承关系）测试：
 class Start {
	public static Start start = new Start();
	private static int a = 3;
	static {
		a += 1;
		print("static");
	}

	public static void print(String name) {
		System.out.println(name + ":" + a);
	}

	public void out() {
		System.out.println(a);
	}

	{
		a += 5;
		print("init");
	}

	public Start() {
		a *= 2;
		print("con");
	}

	public static void main(String[] args) {
		Start.print("main");
	}
}

//Java的初始化顺序（父子继承关系）测试：
class A{
	int x = 10;
	
	public A() {
		this.run();//this关键字（指针）指向com.wolfeyes.framework.config.B@7d70d1b1
	}
	
	public void run() {
		System.out.println(this.x);//this关键字（指针）指向com.wolfeyes.framework.config.B@7d70d1b1
	}
}
//总结后得出结论：Java父子继承关系中，属性跟着类走（即：只与实际的上下文环境有关），
//方法重写（覆盖）后以重写（覆盖）后的方法为准（即：除子类中super关键字显式声明调用的特殊情况）。
class B extends A {
	int x = 20;
	
	public B() {
		super();
		run();
		super.run();//super关键字（指针）指向com.wolfeyes.framework.config.A，子类中super关键字显式声明调用的特殊情况
	}
	
	@Override
	public void run() {
		System.out.println(x);
	}
}

class Test {
	//桥接方法测试
	protected class Father {
		public void test() { }
	}
	public class Son extends Father {
	}
	
	public static void main(String[] args) throws NoSuchMethodException, SecurityException {
//		System.out.println(Father.class.getDeclaredMethod("test").isBridge());
//		System.out.println(Son.class.getDeclaredMethod("test").isBridge());
//		Test t = new Test();
//		t.new Son().test();
		B b = new B();
		b.run();
		A a=b;
		a.run();
	}
}
// Java接口支持多继承
 interface I1 {
	 //接口不能具有构造函数
	  //I1() {}
 }
 interface I2 {
	 
 }
 interface I3 {
	 
 }
//Java接口支持多继承
 interface I4 extends I1,I2,I3 {
	 
 }
//Java支持接口的多实现
 abstract class CC implements I1,I2,I3,I4{
	 
	 private int c1;
	 
	 protected int c2;
	 
	 int c3;
	 
	 CC(){
	 }
	 
	 final void c4() {
		 
	 }
 }
 
 class DD extends CC {
	 
	 DD(){
		 super();
		 //super.c1;//字段 CC.c1 不可视
		 //this.c1;//字段 CC.c1 不可视
		 super.c2=0;
		 this.c2=0;
		 this.c2=0;
		 this.c3=0;
		 this.c4();
	 }
 }
 